//package org.com.ashen.web;
//
//import com.alibaba.fastjson.JSON;
//import com.fcibook.quick.http.QuickHttp;
//import org.apache.http.entity.ContentType;
//import org.com.ashen.dal.dataobject.SmsReport;
//import org.junit.Test;
//
//import java.util.List;
//
//public class ProjectTest {
//
////	@Test
////	public void aa() throws Exception{
////
////		//https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wx1d269e07c746148e&secret=5a7a05c03eca8d43cc43b0a52d5cb473
////		String requestUrl="https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=44_zNn-Ij8zbdL3yjFynmtNBoX0g7uBS-Qjqyi8chPBMXLWeKlDLHe3h6ZKhb3z53Efyml0rZVvaDy0fwIEQW5SzEyICCAIPLrnBA5effEA31-St5BzSu9rWgYLIaQuZN8MKTLugvW8ObOLHJzwIHRcAGAAZJ";
////		String templateJson = "{\"touser\":\"obPBD5SMh4uLjaXesp_JApwIBoRI\",\"template_id\":\"RVKoY3yizYehQoFDjs2Obrt0Y6h9feELSboRKptGuBo\",\"data\":{\"character_string3\":{\"value\":\"123\"},\"date2\":{\"value\":\"2021-04-21\"},\"thing4\":{\"value\":\"adsf\"},\"amount1\":{\"value\":\"200元\"}}}";
////		System.out.println(templateJson);
////		String result = new QuickHttp().url(requestUrl)
////				.setContentType(ContentType.APPLICATION_JSON)
////				.addHeader("charset", "utf-8")
////				.setBodyContent(templateJson)
////				.post().
////				text();
////		System.out.println(result);
////	}
//
//
//
////
////	@Test
////	public void aa() throws Exception{
////		Map<String, String> data = new HashMap<String, String>();
////		data.put("appId", "wxe255f1576f056818");
////		data.put("timeStamp", "1599642268");
////		data.put("nonceStr", "4rPJ5LW9oeNvBT0a");
////		data.put("package", "prepay_id=wx09170428388191e8bf0bad2d6d24ff0000");
////		data.put("signType", "MD5");
////		System.out.println(data);
////		String paySign = WXPayUtil.generateSignature(data, "rootsoftrootsoftrootsoftrootsoft");
////		System.out.println(WXPayConstants.API_KEY);
////		data.put("paySign", paySign);
////		System.out.println(data);
////	}
//
////	@Test
////	public void name() {
////		String url = "http://192.168.1.101:8080/dataexchange/receiveData" ;
//////		String url = "https://www.hbxtwl.cn/dataexchange/receiveData" ;
////		String inJson = "{\"id\":\"1524b9a3-827a-4761-8a76-a36281cb665a\",\"topic\":\"ec_goods\",\"event\":\"goodsUpdate\",\"version\":1,\"sign\":\"0a4a71d831fe67b814de273635ca1f8c\",\"msgSignature\":\"4b236e637576d9c4241e8da9fedfa9d5\",\"test\":false,\"business_id\":\"1500204666\",\"public_account_id\":\"100000859817\",\"msg_body\":\"{\\\"goodsIdList\\\":[1219157100117]}\"}";
////		String accessToke = new QuickHttp().url(url)
////				.setContentType(ContentType.APPLICATION_JSON)
////				.addHeader("charset", "utf-8")
////				.setBodyContent(inJson)
////				.post().text();
////		System.out.println(accessToke);
////	}
//
////	@Test
////	public void name() throws InterruptedException {
//////		String url = "http://192.168.1.105:8080/sms/getreportSms" ;
//////		String inJson = "{}";
//////		String accessToke = new QuickHttp().url(url)
//////				.setContentType(ContentType.APPLICATION_JSON)
//////				.addHeader("charset", "utf-8")
//////				.setBodyContent(inJson)
//////				.post().text();
//////		System.out.println(accessToke);
////
////
////		while (true) {
////			Thread.sleep(60*1000L);
////			String appId = "3SDK-EMY-0130-NCRUL";
////			String secretKey = "7D2239E40C2DFCC3";
////			SimpleDateFormat f = new SimpleDateFormat("yyyyMMddHHmmss");
////			String timestamp = f.format(new Date());
////			String sign = md5(appId + secretKey + timestamp);
//////		String inJson = "{\"appId\":\""+appId+"\",\"timestamp\":\""+timestamp+"\",\"sign\":\""+sign+"\"}";
////			String url = "http://www.btom.cn:8080/simpleinter/getReport?appId=" + appId + "&timestamp=" + timestamp + "&sign=" + sign + "&number=100";
////			System.out.println(url);
////			//		System.out.println(inJson);
////			String accessToke = new QuickHttp().url(url)
////					.setContentType(ContentType.APPLICATION_JSON)
////					.addHeader("charset", "utf-8")
//////				.setBodyContent(inJson)
////					.get().text();
////			System.out.println(accessToke);
////			JSONObject jsonObject = JSON.parseObject(accessToke);
////			String data = jsonObject.getString("data");
////			System.out.println(data);
////			if (!data.equals("[]")) {
////				return;
////			}
////		}
////
////
////	}
////
////
////	public String md5(String plainText) {
////		String re_md5 = new String();
////		try {
////			MessageDigest md = MessageDigest.getInstance("MD5");
////			md.update(plainText.getBytes());
////			byte b[] = md.digest();
////
////			int i;
////
////			StringBuffer buf = new StringBuffer("");
////			for (int offset = 0; offset < b.length; offset++) {
////				i = b[offset];
////				if (i < 0)
////					i += 256;
////				if (i < 16)
////					buf.append("0");
////				buf.append(Integer.toHexString(i));
////			}
////
////			re_md5 = buf.toString();
////
////		} catch (Exception e) {
////			e.printStackTrace();
////		}
////		return re_md5;
////	}
//
////	@Test
////	public void name2() {
////		String appid = "wxed8617988c573ed8";
////		String redirect_uri = "http://www.shws1942.com/_wx_.htm";
////		String url = "https://open.weixin.qq.com/connect/oauth2/authorize?appid="+appid+"&redirect_uri="+redirect_uri+"&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect" ;
////System.out.println(url);
////		//		String url = "https://www.hbxtwl.cn/dataexchange/receiveData" ;
//////		String inJson = "{\"publicAccountId\":\"123\"}";
////		String accessToke = new QuickHttp().url(url)
////				.setContentType(ContentType.APPLICATION_JSON)
////				.addHeader("charset", "utf-8")
//////				.setBodyContent(inJson)
////				.post().text();
////		System.out.println(accessToke);
////	}
//
////	//测试短信发送
//
//
//
//
////	//测试短信发送
////		@Test
////		public void name3() {
//////			String injson = "{\"sessionid\":\"761582586\"}";
//////			String outputStr = "injson=" + injson + "&method=up_nbmtdh_category_spu&isencode=false&parse=json";
////			String outputStr = "sessionid=761582586&code=01";
////			System.out.println(outputStr);
////			String result = new QuickHttp()
////					.url("http://192.168.1.108:8080/tms1/jxcdl/getall?"+outputStr)
//////					.url("http://192.168.1.108:8080/tms1/assaasnew?"+outputStr)
////					.setContentType(ContentType.APPLICATION_JSON)
////					.addHeader("charset", "utf-8")
////					.setBodyContent(outputStr)
////					.get()
////					.text();
////
////			System.out.println(result);
////		}
//
//
//
//////		//测试短信发送
////			@Test
////			public void name3() {
////				String injson = "{\"sessionid\":\"1490377319\",\"dbid\":\"NBMTDev\",\"code\":\"01\",\"findtext\":\"\",\"spu\":\"\",\"sorttype\":\"综合\",\"sortorder\":\"desc\"}";
////				String outputStr = "injson=" + injson + "&method=up_nbmtdh_category_spulist&isencode=false&parse=json";
//////				String outputStr = "sessionid=761582586&code=01";
////				System.out.println(outputStr);
////				String result = new QuickHttp()
////						.url("http://www.a-shen.net/taide/assaas?"+outputStr)
////						.setContentType(ContentType.APPLICATION_JSON)
////						.addHeader("charset", "utf-8")
//////						.setBodyContent(outputStr)
////						.get()
////						.text();
////				System.out.println(result);
////			}
//
//
////    {"appid":"","appsecret":"","injson":"{\"mobile\":\"15801778061\",\"smschannel\":
////\"aliyun\",\"smstype\":\"notify\",\"customSmsId\":\"上卧\",\"extendCode\":\"SMS_
////        199793444\",\"smscontent\":{\"name1\":\"2023-06-21\",\"name2\":\"1\"}}","isencod
////        e":"false","method":"sms_sendsms","parse":"json"}
//	//测试短信发送
//		@Test
//		public void aa() {
////			http://www.shws1942.com/sms/singleSms?injson={"mobile":"13651949883","smschannel":"aliyun","smstype":"notify","customSmsId":"上卧","extendCode":"SMS_199793444","smscontent":{"name1":"2023-06-21","name2":"1"}}&method=sms_sendsms&isencode=false&parse=json
//
//			String injson = "{\"mobile\":\"13651949883\",\"smschannel\":\"aliyun\",\"smstype\":\"notify\",\"customSmsId\":\"上卧\",\"extendCode\":\"SMS_199793444\",\"smscontent\":{\"name1\":\"2023-06-21\",\"name2\":\"1\"}}";
//            String outputStr = "injson=" + injson + "&method=sms_sendsms&isencode=false&parse=json";
////			String injson = "{\"mobile\":\"13651949883\",\"smschannel\":\"yimei\",\"smstype\":\"notify\",\"smscontent\":\"【南北码头】您的‘南北码头消息’服务号好久没有打开了，现在暂时接受不了通知，请打开‘南北码头消息’服务号\"}";
////			String injson = "{\"mobile\":\"13651949883\",\"smschannel\":\"yimei\",\"smstype\":\"notify\",\"smscontent\":\"【南北码头】客户:南通1  订单单号:12323233  请你您尽快登录[南北码头管理系统]小程序审核该订单\"}";
////			String outputStr = "injson=" + injson + "&method=sms_sendsms&isencode=false&parse=json";
////			String injson = "{\"mobile\":\"13651949883\",\"smschannel\":\"yimei\",\"smstype\":\"code\"}";
////			String outputStr = "injson=" + injson + "&method=sms_getpin&isencode=false&parse=json";
//
////            String injson = "{\"smsid\":\"1\"}";
////            String outputStr = "smsid=1";name3
//			System.out.println(outputStr);
//			String result = new QuickHttp()
//					.url("http://www.shws1942.com/sms/singleSms?"+outputStr)
//					.setContentType(ContentType.APPLICATION_JSON)
//					.addHeader("charset", "utf-8")
//					.setBodyContent(outputStr)
//					.get()
//					.text();
//
//			System.out.println(result);
//		}
//
//
//		//测试短信发送
////		@Test
////		public void name4() {
////				String injson = "{\"touser\":\"obPBD5SMh4uLjaXesp_JApwIBoRI\",\"template_id\":\"RVKoY3yizYehQoFDjs2Obrt0Y6h9feELSboRKptGuBo\",\"page\":\"pages/myorder/myorder\",				\"data\":{				\"character_string3\":{					\"value\":\"00000019\"				},				\"date2\":{					\"value\":\"2021年04月28日\"				},				\"thing4\":{					\"value\":\"ss\"				},				\"amount1\":{					\"value\":\"117.65元\"				}				}			}";
////				String result = new QuickHttp()
////					.url("https://www.hbxtwl.cn/pays/sendnoticenbmtdhpt?data="+injson)
////					.setContentType(ContentType.APPLICATION_JSON)
////					.addHeader("charset", "utf-8")
////					.setBodyContent(injson)
////					.get()
////					.text();
////
////			System.out.println(result);
////		}
////	{"touser":"","templateId":"RVKoY3yizYehQoFDjs2Obrt0Y6h9feELSboRKptGuBo","page":"pages/myorder/myorder",				"data":{				"character_string3":{					"value":"00000019"				},				"date2":{					"value":"2021年04月28日"				},				"thing4":{					"value":""				},				"amount1":{					"value":"117.65元"				}				}			}
////	 @Test
////	   public void push() throws UnsupportedEncodingException {
////
////		 String url="http://www.hbxtwl.cn/oa/systest";
////
////
////
////
////		 MediaType JSON = MediaType.parse("application/json; charset=utf-8");
//////		    RequestBody body = RequestBody.create(JSON, json);
//////		    Request request = new Request.Builder()
//////		            .url(url)
//////		            .post(body)
//////		            .build();
//////		    Response response = client.newCall(request).execute();
//////		    return response.body().string();
////
////		    OkHttpClient okHttpClient = new OkHttpClient();
////		    FormBody formBody = new FormBody.Builder()
////		    		.add("method","sysdbip")
////		    		.add("sessionid","90736646")
////		    		.add("injson","{\"DbName\":\"阿申档案\",\"ProgramName\":\"TRM\",\"TerminalType\":\"ANDROID\"}")
////		    		.build();
////		    Request request = new Request.Builder()
////		    .post(formBody)
////		    .url(url)
////
////		    .build();
////		    try {
////		    Response response = okHttpClient.newCall(request).execute();
////		    String result = response.body().string();
////		    response.body().close();
////		    System.out.println(result);
////		    } catch (IOException e) {
////		    e.printStackTrace();
////		    }
////
//////		    OkHttpClient okHttpClient = new OkHttpClient();
//////            //Form表单格式的参数传递
//////            FormBody formBody = new FormBody
//////                    .Builder()
//////                    .add("username","androidxx.cn")//设置参数名称和参数值
//////                    .build();
//////            Request request = new Request
//////                    .Builder()
//////                    .post(formBody)//Post请求的参数传递
//////                    .url(Config.LOCALHOST_POST_URL)
//////                    .build();
//////            okHttpClient.newCall(request).enqueue(new Callback() {
//////                @Override
//////                public void onFailure(Call call, IOException e) {}
//////
//////                @Override
//////                public void onResponse(Call call, Response response) throws IOException {
//////                    //此方法运行在子线程中，不能在此方法中进行UI操作。
//////                    String result = response.body().string();
//////                    Log.d("androixx.cn", result);
//////                    response.body().close();
//////                }
//////            });
////
////
////
////	 }
////
////
////	 @Test
////	 public void upload() {
////		    OkHttpClient okHttpClient = new OkHttpClient();
////		    FormBody formBody = new FormBody.Builder()
////		    		.add("ip", "http://192.168.1.118:8080")
////		    		.add("picName", "aa.png")
////		    		.add("modcode", "DMSJ20")
////		    		.add("method", "i")
////		    		.add("dbid", "DM")
////		    		.build();
////		    Request request = new Request.Builder()
////		    .post(formBody)
////		    .addHeader("content-type", "application/json;charset=utf-8")
////		    .url("http://192.168.1.118:8080/upload/uploadfile2")
////		    .build();
////
////		    try {
////			    Response response = okHttpClient.newCall(request).execute();
////			    String result = response.body().string();
////			    response.body().close();
////			    System.out.println(result);
////			    } catch (IOException e) {
////			    e.printStackTrace();
////			    }
////	}
////
//
////	 @Test
////	 public void systest() {
////		SaasService saasService = new SaasService();
////		SaasServiceSoap soap= saasService.getSaasServiceSoap();
////
//////		Holder<Integer> sessionId = new Holder<Integer>();
//////		Holder<String> userId = new Holder<String>();
//////		Holder<String> userName = new Holder<String>();
//////		Holder<String> deptId = new Holder<String>();
//////		Holder<String > errorMessage = new Holder<String>();
//////		Holder<Integer> sysLoginResult = new Holder<Integer>();
//////
//////		soap.sysLogin("", "", "", "RTOA", "033", "", sessionId, userId, userName, deptId, errorMessage, sysLoginResult);
////
////
////
////		Holder<Integer> rowCount = new Holder<Integer>();
////		Holder<Integer> length = new Holder<Integer>();
////		Holder<String> compressFlag = new Holder<String>();
////		Holder<String> errorMessage = new Holder<String>();
////		Holder<byte[]> sysSqlSelectResult = new Holder<byte[]>();
////		Integer sessionId = 589381868;
////		String sql = "select * from crm_cp";
////
////		soap.sysSqlSelect(sessionId, sql, rowCount, length, compressFlag, errorMessage, sysSqlSelectResult);
////		System.out.println(length.value);
////		System.out.println(rowCount.value);
////
//////		System.out.println(new String(uncompressToString(Arrays.copyOfRange(sysSqlSelectResult.value, 12, sysSqlSelectResult.value.length-12))));
//////		System.out.println(new String(uncompressToString(sysSqlSelectResult.value)));
////		System.out.println(sysSqlSelectResult.value);
////
////	}
////
////
////	 @Test
////	 public void aaa() {
////
////String bb="{\"asd\"；\"最近太他而公司二个儿\"}";
////String aa ="}!crf!＝!朂运夬仕耎八叺事丬儾$|";
////
////System.out.println(CodeUtil.Encode(aa));
////
////	}
//
//
//
//
//
//}
